//
// Created by liushuai on 18-8-8.
//

#include "Teacher.hpp"
#include "Person.hpp"
#include <string>
Teacher::Teacher(std::string u, std::string num, Person &p) : uni(u),number(num),Person(p){};
Teacher::Teacher(std::string u, std::string num, std::string n, int a) : uni(u),number(num),Person(n,a) {};
std::string& Teacher::get_uni() { return uni;}
std::string& Teacher::get_number() { return number;}
Teacher::~Teacher() {}
Teacher &Teacher::operator=(const Teacher &p) {
    if(this==&p)
        return *this;
    else
        uni = p.uni;
        number = p.number;
        return *this;
}
std::ostream &operator<<(std::ostream &os, Teacher &t) {
    os<<(const Person &) t;
    os<<t.uni<<"\n";
    os<<t.number<<"\n";
    return os;
}
